window.onload = function() {
    el = document.getElementById('speed');
    var resul = document.getElementById('result');
    var orginalContent = resul.innerHTML;
    if (options['limit']) el.value=Math.round(Number(options['limit']) / 40);
    valueAsInt = Math.round(Number(el.value) * 40);
    resul.innerHTML = orginalContent + valueAsInt;
    el.onDragStart = function() {
        in_elem = document.getElementById('speed').className = "sliderondrag";
    }
    
    el.onDrag = function() {
        //var value_elem = document.getElementById('speed_value');
        //value_elem.value = Math.round(Number(this.value));
        valueAsInt = Math.round(Number(this.value) * 40);
        resul.innerHTML = orginalContent + valueAsInt;
    };
    el.onDragStop = function() {
        //resul.innerHTML="bri";
        in_elem = document.getElementById('speed').className = "slider";
    }
    form_slider(el, '200');
    init();
}
